App.controller('assetTransferController', ['$rootScope', '$scope', '$state', 'Page', function($rootScope, $scope, $state, Page) {

    $scope.grid = {
//        add : function() {
//            $scope.assetTransfer = {};
//            $scope.modal.show();
//        },
//        update: function(row) {
//            $scope.assetTransfer = row;
//           $scope.modal.show();
//        },
//        save : function() {
//            Page.ajaxPost($scope.assetTransfer.assetTransferId ? 'assetTransfer/update.do' : 'assetTransfer/add.do', $scope.assetTransfer, function() {
//                $scope.grid.query();
//                $scope.grid.cancel();
//            });
//        },
        column_defs: [{
            target : 7,
            buttons : [
                {
                    name: '编辑',
                    class: 'btn-warning btm-sm',
                    icon: 'fa-edit',
                    event: 'update'
                },
                {
                    name: '删除',
                    class: 'btn-danger',
                    icon: 'fa-close',
                    event: function(row) {
                        Page.confirm("确定要删除吗？", function() {
                            Page.ajaxPost('assetTransfer/delete.do', row, function() {
                                $scope.grid.query();
                            });
                        });
                    }
                }
            ]
        }]
    };


}]);